
*********************************************
****   Description   ************************
*********************************************

*This program generates "Figure 1. Advertising Frequency Across Newspapers: The Freedman's Savings Bank versus Other Banks" from our newspaper dataset. 


*********************************************
****   Plot   *******************************
*********************************************
use "$Data/AdvertisingSource_AllArticles_December2024.dta", clear

destring identifier, force replace

collapse (count) identifier, by(FSB Readership)

egen identifier2=total(identifier), by(FSB)

gen audience=(Readership=="African American")

label define audience_label 0 "All Newspapers" 1 "African American Newspapers"
label values audience audience_label

replace identifier=identifier2 if audience==0

replace FSB=1-FSB
label define fsb_label 0 "FSB" 1 "Other"
label values FSB fsb_label


graph bar identifier,  over(FSB) over(audience, gap(*1.5)) asyvars bar(1, color(gs5)) bar(2, color(gs12)) ytitle(% of Ads) legend(label(1 "Freedman's Savings Bank") label(2 "All Other Banks")) stack percent graphregion(color(white)) legend(region(lwidth(none))) ylab(, nogrid) ytitle("% of Advertisements")
  
 
 